/*
 * FilePath     : \uno.config.ts
 * Author       : SJZ
 * Date         : 2025-03-12 19:28
 * LastEditors  : SJZ
 * LastEditTime : 2025-03-12 19:38
 * Description  : unocss 配置文件
 * CodeIterationRecord: 
 */

import {
  defineConfig,
  presetUno,
  presetAttributify,
  presetTypography,
  presetWebFonts,
  presetWind,
  presetMini,
  transformerVariantGroup,
  transformerDirectives,
  transformerCompileClass,
  transformerAttributifyJsx
} from "unocss";
import type { Theme } from "unocss/preset-uno";
import presetTheme from "unocss-preset-theme";
import presetRemToPx from "@unocss/preset-rem-to-px";
import unoCssOption from "./src/unocss/index";
const { themes, rules, shortcuts, variants } = unoCssOption;
export default defineConfig({
  presets: [
    presetUno(),
    presetAttributify({
      prefix: "un-",
      prefixedOnly: true // <--
    }),
    presetTypography(),
    presetWebFonts({
      fonts: {
        sans: "Roboto",
        serif: "Merriweather"
      }
    }),
    presetWind(),
    presetMini(),
    presetRemToPx({
      baseFontSize: 12
    }) as any,
    unoCssOption,
    presetTheme<Theme>({
      theme: themes
    })
  ],
  layers: {
    components: -2,
    default: 1,
    user: 2
  },
  transformers: [transformerVariantGroup(), transformerDirectives(), transformerCompileClass(), transformerAttributifyJsx()],
  variants: variants,
  rules: rules,
  shortcuts: shortcuts
});
